﻿@model ContentResourceDto
@{
    var x = @Html.EasyUi();
}
<style type="text/css">
    .tagconfig-option {
        background-color: #696969;
        color: #ffffff;
        cursor: pointer;
        padding: 7px;
        margin-right: 5px;
        margin-top: 5px;
        float: left;
    }

        .tagconfig-option:hover {
            background-color: #adff2f;
            color: #000000;
        }
</style>
<script type="text/javascript">
    var save_after = function () {
        $.easyui.closeDialog();
    }
</script>
@using (x.Tabs().AddAttribute("Id", "tabs_contentResources").Border(false).Fit().Begin())
{
    switch (Model.Type)
    {
        case ContentResourceType.Article:
            using (x.TabPanel("文 章").Begin())
            {
                @Html.Partial("Parts/Form/Parts/Article", Model)
            }
            break;
        case ContentResourceType.Video:
            using (x.TabPanel("视 频").Begin())
            {
                @Html.Partial("Parts/Form/Parts/Video", Model)
            }
            break;
        case ContentResourceType.Atlas:
            using (x.TabPanel("图 集").Begin())
            {
                @Html.Partial("Parts/Form/Parts/Atlas", Model)
            }
            break;
        default:
            using (x.TabPanel("文 章").Begin())
            {
                @Html.Partial("Parts/Form/Parts/Article", new ContentResourceDto { Type = ContentResourceType.Article })
            }
            using (x.TabPanel("视 频").Begin())
            {
                @Html.Partial("Parts/Form/Parts/Video", new ContentResourceDto { Type = ContentResourceType.Video })
            }
            using (x.TabPanel("图 集").Begin())
            {
                @Html.Partial("Parts/Form/Parts/Atlas", new ContentResourceDto { Type = ContentResourceType.Atlas })
            }
            break;
    }
}